<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>绑定属性</title>
    <style>
        .my{
            border: 1px solid red;
        }
    </style>
</head>
<body>
    <div id="div">
        <a href="http://www.baidu.com">百度一下</a>
        <br>
        <!--需求1：将vue中定义的heimaHref添加给该a标签-->
        <a v-bind:href="myHref">黑马一下</a>
        <!--简写-->
            <a :href="myHref">黑马一下</a>

        <br>
        <!--需求2：动态绑定class属性-->
        <div :class="myClass">我是div</div>
    </div>
</body>
<script src="js/vue.js"></script>
<script>
    new Vue({
          el:"div",
        data:{
              myHref:"http://www.itheima.com",
              myClass:"my"
          }
    });
</script>
</html>